package com.sola.jdbc.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.sola.jdbc.bean.Uesr;
import com.sola.jdbc.dao.IuserDao;


@Repository
public class UserDao implements IuserDao{

	@Autowired
	private JdbcTemplate template;
	
	@Override
	public int add(Uesr user) {
		return 0;
	}

	@Override
	public int update(Uesr user) {
		String sql = "update user set password= ? where id = ?";
		return template.update(sql, user.getPassword(),user.getId());
	}

	@Override
	public int delete(Integer id) {
		return 0;
	}

	@Override
	public Uesr getAccountById(String id) {
		return null;
	}

	@Override
	public List<Uesr> getAccountList() {
		// TODO Auto-generated method stub
		return null;
	}

}
